//Copyright 2011 - Jonathan Allen

using System;
using System.Collections.Generic;
using System.Linq;
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;

namespace Granite.Eventing
{
/// <summary>
/// This interface allows attaching and removing weak event handlers that listen for CollectionChanged events
/// </summary>
public interface INotifyPropertyChangedWeak : INotifyPropertyChanged
{
	/// <summary>
	/// Attach a weak event handler to this object
	/// </summary>
	/// <param name="eventHandler"></param>
	[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "AddHandler")]
	void AddHandler(IListener<PropertyChangedEventArgs> eventHandler);

	/// <summary>
	/// Remove a weak event handler from this object
	/// </summary>
	/// <param name="eventHandler"></param>
	[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "RemoveHandler")]
	void RemoveHandler(IListener<PropertyChangedEventArgs> eventHandler);
}
}
